Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install SofaPython3 CI action. #82

Merged

Conversation

olivier-roussel
Copy link
Contributor

This was initially done for #81.
This PR intend to fix broken CI when building a release branch, defined in the sofa_branch field in the ci.yml:

sofa_branch: [master]

For a given plugin release that needs to install SofaPython3 plugin, the expected behavior should be to install the corresponding release of the plugin (instead of master-nightly).
So far, the path was broken as it was a mix of current sofa_branch value and hard-coded master or master-nightly.
This solution should be fine as long we limit the scope of branches that can be specified in the sofa_branch field of ci.yml to master and release branches, as for non-master branches it will try to install a release of SofaPython3 defined by the branch name, and it will only exists if it a release. This is open for discussion.
This should be integrated into master of all plugins for which the CI rely on SofaPython3 installation for the future releases.

@olivier-roussel
Copy link
Contributor Author

I guess the broken link to SofaPython3 master nightly release is due to that current CI of SofaPython3 is down, awaiting sofa-framework/SofaPython3#364.
Let's wait for this to be merged first and check if this properly fix this CI.

Comment on lines 57 to 61
if [[ "${{ matrix.sofa_branch }}" == "master" ]]; then
url="${url}/release-master-nightly/SofaPython3_master-nightly_python-${{ matrix.python_version }}_for-SOFA-master_${{ runner.os }}.zip"
else
url="${url}/release-${{ matrix.sofa_branch }}/SofaPython3_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip"
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ "${{ matrix.sofa_branch }}" == "master" ]]; then
url="${url}/release-master-nightly/SofaPython3_master-nightly_python-${{ matrix.python_version }}_for-SOFA-master_${{ runner.os }}.zip"
else
url="${url}/release-${{ matrix.sofa_branch }}/SofaPython3_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip"
fi
url="${url}/release-${{ matrix.sofa_branch }}/SofaPython3_${{ matrix.sofa_branch }}_python-${{ matrix.python_version }}_for-SOFA-${{ matrix.sofa_branch }}_${{ runner.os }}.zip"

Why searching for master-nightly and not master? I suspect that master-nightly is not even built nightly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question. Honestly I don't know, I kept the master-nightly as it was already there.
I don't see any drawback switching to non-nightly build, and it would make the code simpler.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term nightly comes from
https://github.com/sofa-framework/SofaPython3/blob/c5c1603cbfaa1ef5f11a5402186e83635edfba3b/.github/workflows/ci.yml#L6, which is triggered only manually. Unless there is a reason I don't see, I would not base the other plugins on this package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. I've made the changes.

@olivier-roussel olivier-roussel marked this pull request as ready for review July 27, 2023 13:08
@alxbilger alxbilger merged commit 0e8bfea into SofaDefrost:master Jul 27, 2023
3 of 4 checks passed
@olivier-roussel olivier-roussel deleted the fix_installsofapython3_ci branch August 9, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants